package com.oocl.training.sort;

import java.util.Comparator;

import com.oocl.training.pojo.Customer;

/**
 * 按照ID排序
 * @author GANAB
 *
 */
public class IdComparator implements Comparator<Customer>{

	public int compare(Customer o1, Customer o2) {
		Integer id1 = Integer.parseInt(o1.getId());
		Integer id2 = Integer.parseInt(o2.getId());
		return id1-id2;
	}

}
